using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
	[Serializable]
	public partial class SOHONNHANModel : ObjModel<SOHONNHAN>, IModelConverter
	{

		#region Constructor

		public SOHONNHANModel()
			: base()
		{
		}

		public SOHONNHANModel(SOHONNHAN obj)
			: base(obj)
		{
		}

		#endregion

		#region Fields

		private System.Guid _mahonnhan;

		private System.Guid? _magiaodan_chong;

		private System.Guid? _magiaodan_vo;

		private System.String _tenchong;

		private System.String _tenvo;

		private System.Guid? _manhanchung1;

		private System.String _tennhanchung1;

		private System.Guid? _manhanchung2;

		private System.String _tennhanchung2;

		private System.Guid? _malinhmuc;

		private System.String _tenlinhmuc;

		private System.Guid? _mahientranghonnhan;

		private System.Guid? _matongiao;

		private System.String _tencha;

		private System.String _tenme;

		private System.Guid? _magiaophan;

		private System.Guid? _magiaohat;

		private System.Guid? _magiaoxu;

		private System.String _tengiaoxu;

		private System.String _diachi;

		private System.Boolean? _lyhon;

		private System.String _ghichu;

		private System.Int32? _ngay;

		private System.Int32? _thang;

		private System.Int32? _nam;

		private System.Int32? _maso;

		private System.Boolean? _luuso;

		#endregion

		#region Properties

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid MAHONNHAN
		{
			get
			{
				return _mahonnhan;
			}
			set
			{
				_mahonnhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN_CHONG
		{
			get
			{
				return _magiaodan_chong;
			}
			set
			{
				_magiaodan_chong = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAODAN_VO
		{
			get
			{
				return _magiaodan_vo;
			}
			set
			{
				_magiaodan_vo = value;
			}
		}

		//[Store]
        [Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENCHONG
		{
			get
			{
				return _tenchong;
			}
			set
			{
				_tenchong = value;
			}
		}

		//[Store]
        [Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENVO
		{
			get
			{
				return _tenvo;
			}
			set
			{
				_tenvo = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MANHANCHUNG1
		{
			get
			{
				return _manhanchung1;
			}
			set
			{
				_manhanchung1 = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENNHANCHUNG1
		{
			get
			{
				return _tennhanchung1;
			}
			set
			{
				_tennhanchung1 = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MANHANCHUNG2
		{
			get
			{
				return _manhanchung2;
			}
			set
			{
				_manhanchung2 = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENNHANCHUNG2
		{
			get
			{
				return _tennhanchung2;
			}
			set
			{
				_tennhanchung2 = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MALINHMUC
		{
			get
			{
				return _malinhmuc;
			}
			set
			{
				_malinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENLINHMUC
		{
			get
			{
				return _tenlinhmuc;
			}
			set
			{
				_tenlinhmuc = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAHIENTRANGHONNHAN
		{
			get
			{
				return _mahientranghonnhan;
			}
			set
			{
				_mahientranghonnhan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MATONGIAO
		{
			get
			{
				return _matongiao;
			}
			set
			{
				_matongiao = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENCHA
		{
			get
			{
				return _tencha;
			}
			set
			{
				_tencha = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENME
		{
			get
			{
				return _tenme;
			}
			set
			{
				_tenme = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOPHAN
		{
			get
			{
				return _magiaophan;
			}
			set
			{
				_magiaophan = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOHAT
		{
			get
			{
				return _magiaohat;
			}
			set
			{
				_magiaohat = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Guid? MAGIAOXU
		{
			get
			{
				return _magiaoxu;
			}
			set
			{
				_magiaoxu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String TENGIAOXU
		{
			get
			{
				return _tengiaoxu;
			}
			set
			{
				_tengiaoxu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(500, ErrorMessage= "Value must be under 500 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String DIACHI
		{
			get
			{
				return _diachi;
			}
			set
			{
				_diachi = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Boolean? LYHON
		{
			get
			{
				return _lyhon;
			}
			set
			{
				_lyhon = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		[StringLength(2000, ErrorMessage= "Value must be under 2000 characters")]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.String GHICHU
		{
			get
			{
				return _ghichu;
			}
			set
			{
				_ghichu = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NGAY
		{
			get
			{
				return _ngay;
			}
			set
			{
				_ngay = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? THANG
		{
			get
			{
				return _thang;
			}
			set
			{
				_thang = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? NAM
		{
			get
			{
				return _nam;
			}
			set
			{
				_nam = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Int32? MASO
		{
			get
			{
				return _maso;
			}
			set
			{
				_maso = value;
			}
		}

		//[Store]
		//[Required(ErrorMessage = "Value is required")]
		//[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
		//[StringLength(0)]
		//[EmailRegx]
		//[NumberRegx]
		//[RealNumberRegx]
		//[IntergerRegx]
		//[RealIntergerRegx]
		public System.Boolean? LUUSO
		{
			get
			{
				return _luuso;
			}
			set
			{
				_luuso = value;
			}
		}

		#endregion

		#region IModelConverter

		public System.Type Reflector()
		{
			return typeof(SOHONNHANModel);
		}

		public object GetModel()
		{
			return this;
		}

		#endregion

		#region Overrides of Model<SOHONNHAN>

		public override void ReverttoModel()
		{
			CreateModel(this);
		}

		public override SOHONNHAN ReverttoBussiness()
		{
			return CreateBussiness(this);
		}

		#endregion

		#region Operators

		public static implicit operator SOHONNHANModel(SOHONNHAN obj)
		{
			return new SOHONNHANModel(obj);
		}
		public static implicit operator SOHONNHAN(SOHONNHANModel obj)
		{
			return obj.ReverttoBussiness();
		}

		#endregion

	}
}
